package com.qfjy.homework.zyq;

/**
 * @author : zyq
 * @version : 1.0
 * @date :2023/6/29 20:50
 */
public class What {
    public static OneDay getOneDay(String value){
        if (value==null){
            return null;
        }if (value.equals("睡觉")){
            return new Sleep();
        }if (value.equals("吃饭")){
            return new Dine();
        }if (value.equals("游戏")){
            return new Game();
        }
        return null;
    }
}
